package com.kjtpay.design_pattern.singleton;

/**
 * 静态内部类方式单例
 */
class StaticNestedClassSingleton {
    private static class SingletonHolder {
        private static final StaticNestedClassSingleton INSTANCE = new StaticNestedClassSingleton();
    }
    private StaticNestedClassSingleton (){}
    public static final StaticNestedClassSingleton getInstance() {
        return SingletonHolder.INSTANCE;
    }
}
